package van.planifolia.work;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Hashtable;
import java.util.List;

/**
 * Created by Intellij IDEA<br>
 *
 * @author Planifolia.Van
 * @version 1.0
 * @date 2022/11/2 18:27
 */
public class UnSafeCollection {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        // 创建20个线程循环读写
        for (int i = 0; i < 20; i++) {
            new Thread(()->{
                list.add(Thread.currentThread().getName());
                System.out.println(list);
            }).start();
        }
    }
}
